ALMaSS  1.0
The Animal, Landscape and Man Simulation System
Rodenticide.cpp File Reference
#include <iostream>
#include <fstream>
#include <list>
#include <string>
#include "../Landscape/ls.h"
#include "../BatchALMaSS/BoostRandomGenerators.h"

Variables

boost::variate_generator< base_generator_type &, boost::uniform_real<> > g_rand_uni
 
CfgFloat cfg_rodenticide_diffusionRate ("RODENTICIDE_DIFFUSIONRATE", CFG_CUSTOM, 0.5)
 
CfgFloat cfg_rodenticide_immigrationRate ("RODENTICIDE_IMMIGRATIONRATE", CFG_CUSTOM, 1.0)
 
CfgFloat cfg_rodenticide_deathRate ("RODENTICIDE_DEATHRATE", CFG_CUSTOM, 0.048307)
 
CfgInt cfg_rodenticide_gridsize ("RODENTICIDE_GRIDSIZE", CFG_CUSTOM, 5)
 
CfgFloat cfg_rodenticide_BLtown_AnnFreq ("RODENTICIDE_BLTYPE_TOWN_ANNFREQ", CFG_CUSTOM, 0.05)
 
CfgFloat cfg_rodenticide_BLcountry_AnnFreq ("RODENTICIDE_BLTYPE_COUNTRY_ANNFREQ", CFG_CUSTOM, 0.33)
 
CfgFloat cfg_rodenticide_BLwoodland_AnnFreq ("RODENTICIDE_BLTYPE_WOODLAND_ANNFREQ", CFG_CUSTOM, 0.01)
 
CfgFloat cfg_rodenticide_BLchristmastrees_AnnFreq ("RODENTICIDE_BLTYPE_CTREES_ANNFREQ", CFG_CUSTOM, 0.05 *(5/9))
 
CfgFloat cfg_rodenticide_BLgrass_AnnFreq ("RODENTICIDE_BLTYPE_GRASS_ANNFREQ", CFG_CUSTOM, 0.05 *(5/9))
 
CfgInt cfg_rodenticide_BLtown_Length ("RODENTICIDE_BLTYPE_TOWN_LENGTH", CFG_CUSTOM, 34)
 
CfgInt cfg_rodenticide_BLcountry_Length ("RODENTICIDE_BLTYPE_COUNTRY_LENGTH", CFG_CUSTOM, 34)
 
CfgInt cfg_rodenticide_BLwoodland_Length ("RODENTICIDE_BLTYPE_WOODLAND_LENGTH", CFG_CUSTOM, 82)
 
CfgInt cfg_rodenticide_BLchristmasstrees_Length ("RODENTICIDE_BLTYPE_CTREE_LENGTH", CFG_CUSTOM, 82)
 
CfgInt cfg_rodenticide_BLgrass_Length ("RODENTICIDE_BLTYPE_GRASS_LENGTH", CFG_CUSTOM, 82)
 
CfgInt cfg_rodenticide_dumpmapday ("RODENTICIDE_DUMPMAPDAY", CFG_CUSTOM, 180)
 
CfgInt cfg_rodenticide_dumpmapstartyear ("RODENTICIDE_DUMPMAPSTARTYEAR", CFG_CUSTOM, 99999)
 
CfgInt cfg_rodenticide_dumpmapendyear ("RODENTICIDE_DUMPMAPENDYEAR", CFG_CUSTOM,-1)
 
CfgInt cfg_rodenticide_dumppolyinterval ("RODENTICIDE_DUMPPOLYINTERVAL", CFG_CUSTOM, 180)
 
CfgInt cfg_rodenticide_dumppolystartyear ("RODENTICIDE_DUMPPOLYSTARTYEAR", CFG_CUSTOM, 99999)
 
CfgInt cfg_rodenticide_dumppolyendyear ("RODENTICIDE_DUMPPOLYENDYEAR", CFG_CUSTOM,-1)
 

Variable Documentation

◆ cfg_rodenticide_BLchristmasstrees_Length

CfgInt cfg_rodenticide_BLchristmasstrees_Length("RODENTICIDE_BLTYPE_CTREE_LENGTH", CFG_CUSTOM, 82) ( "RODENTICIDE_BLTYPE_CTREE_LENGTH"  ,
CFG_CUSTOM  ,
82   
)

The length of time in days that bait is available after placement in a christmass tree plantation.

Referenced by RodenticideManager::DoPlaceBait().

◆ cfg_rodenticide_BLchristmastrees_AnnFreq

CfgFloat cfg_rodenticide_BLchristmastrees_AnnFreq("RODENTICIDE_BLTYPE_CTREES_ANNFREQ", CFG_CUSTOM, 0.05 *(5/9)) ( "RODENTICIDE_BLTYPE_CTREES_ANNFREQ"  ,
CFG_CUSTOM  ,
0.05 *  5/9 
)

The annual probability of bait placement at a woodland location.

Referenced by RodenticideManager::ShouldPlaceBait().

◆ cfg_rodenticide_BLcountry_AnnFreq

CfgFloat cfg_rodenticide_BLcountry_AnnFreq("RODENTICIDE_BLTYPE_COUNTRY_ANNFREQ", CFG_CUSTOM, 0.33) ( "RODENTICIDE_BLTYPE_COUNTRY_ANNFREQ"  ,
CFG_CUSTOM  ,
0.  33 
)

The annual probability of bait placement at a farm/rural house location.

Referenced by RodenticideManager::ShouldPlaceBait().

◆ cfg_rodenticide_BLcountry_Length

CfgInt cfg_rodenticide_BLcountry_Length("RODENTICIDE_BLTYPE_COUNTRY_LENGTH", CFG_CUSTOM, 34) ( "RODENTICIDE_BLTYPE_COUNTRY_LENGTH"  ,
CFG_CUSTOM  ,
34   
)

The length of time in days that bait is available after placement in a rural building location.

Referenced by RodenticideManager::DoPlaceBait().

◆ cfg_rodenticide_BLgrass_AnnFreq

CfgFloat cfg_rodenticide_BLgrass_AnnFreq("RODENTICIDE_BLTYPE_GRASS_ANNFREQ", CFG_CUSTOM, 0.05 *(5/9)) ( "RODENTICIDE_BLTYPE_GRASS_ANNFREQ"  ,
CFG_CUSTOM  ,
0.05 *  5/9 
)

The annual probability of bait placement at a woodland location.

Referenced by RodenticideManager::ShouldPlaceBait().

◆ cfg_rodenticide_BLgrass_Length

CfgInt cfg_rodenticide_BLgrass_Length("RODENTICIDE_BLTYPE_GRASS_LENGTH", CFG_CUSTOM, 82) ( "RODENTICIDE_BLTYPE_GRASS_LENGTH"  ,
CFG_CUSTOM  ,
82   
)

The length of time in days that bait is available after placement in a grassland

Referenced by RodenticideManager::DoPlaceBait().

◆ cfg_rodenticide_BLtown_AnnFreq

CfgFloat cfg_rodenticide_BLtown_AnnFreq("RODENTICIDE_BLTYPE_TOWN_ANNFREQ", CFG_CUSTOM, 0.05) ( "RODENTICIDE_BLTYPE_TOWN_ANNFREQ"  ,
CFG_CUSTOM  ,
0.  05 
)

The annual probability of bait placement at a town location.

Referenced by RodenticideManager::ShouldPlaceBait().

◆ cfg_rodenticide_BLtown_Length

CfgInt cfg_rodenticide_BLtown_Length("RODENTICIDE_BLTYPE_TOWN_LENGTH", CFG_CUSTOM, 34) ( "RODENTICIDE_BLTYPE_TOWN_LENGTH"  ,
CFG_CUSTOM  ,
34   
)

The length of time in days that bait is available after placement in a town location.

Referenced by RodenticideManager::DoPlaceBait().

◆ cfg_rodenticide_BLwoodland_AnnFreq

CfgFloat cfg_rodenticide_BLwoodland_AnnFreq("RODENTICIDE_BLTYPE_WOODLAND_ANNFREQ", CFG_CUSTOM, 0.01) ( "RODENTICIDE_BLTYPE_WOODLAND_ANNFREQ"  ,
CFG_CUSTOM  ,
0.  01 
)

The annual probability of bait placement at a woodland location.

Referenced by RodenticideManager::ShouldPlaceBait().

◆ cfg_rodenticide_BLwoodland_Length

CfgInt cfg_rodenticide_BLwoodland_Length("RODENTICIDE_BLTYPE_WOODLAND_LENGTH", CFG_CUSTOM, 82) ( "RODENTICIDE_BLTYPE_WOODLAND_LENGTH"  ,
CFG_CUSTOM  ,
82   
)

The length of time in days that bait is available after placement in a woodland location.

Referenced by RodenticideManager::DoPlaceBait().

◆ cfg_rodenticide_deathRate

CfgFloat cfg_rodenticide_deathRate("RODENTICIDE_DEATHRATE", CFG_CUSTOM, 0.048307) ( "RODENTICIDE_DEATHRATE"  ,
CFG_CUSTOM  ,
0.  048307 
)

The rate of death of poisoned mice. This is assumed to be a constant for simplicity and also determines the distance to which the mice can disperse when poisoned. It is not the death rate of the mice themselves!

Referenced by RodenticideManager::RodenticideManager().

◆ cfg_rodenticide_diffusionRate

CfgFloat cfg_rodenticide_diffusionRate("RODENTICIDE_DIFFUSIONRATE", CFG_CUSTOM, 0.5) ( "RODENTICIDE_DIFFUSIONRATE"  ,
CFG_CUSTOM  ,
0.  5 
)

The rate of diffusion of the mice per day assumed. Mice diffuse from each cell to surrounding cells as a proportion per time step, this proportion is given by this parameter. High diffusion rates lead to longer distances but lower densities.

Referenced by RodenticideManager::RodenticideManager().

◆ cfg_rodenticide_dumpmapday

CfgInt cfg_rodenticide_dumpmapday("RODENTICIDE_DUMPMAPDAY", CFG_CUSTOM, 180) ( "RODENTICIDE_DUMPMAPDAY"  ,
CFG_CUSTOM  ,
180   
)

The day in the year to dump the rodenticide map.

Referenced by RodenticideManager::Tick().

◆ cfg_rodenticide_dumpmapendyear

CfgInt cfg_rodenticide_dumpmapendyear("RODENTICIDE_DUMPMAPENDYEAR", CFG_CUSTOM,-1) ( "RODENTICIDE_DUMPMAPENDYEAR"  ,
CFG_CUSTOM  ,
1 
)

The last year to dump the rodenticide map.

◆ cfg_rodenticide_dumpmapstartyear

CfgInt cfg_rodenticide_dumpmapstartyear("RODENTICIDE_DUMPMAPSTARTYEAR", CFG_CUSTOM, 99999) ( "RODENTICIDE_DUMPMAPSTARTYEAR"  ,
CFG_CUSTOM  ,
99999   
)

The first year to dump the rodenticide map.

Referenced by RodenticideManager::Tick().

◆ cfg_rodenticide_dumppolyendyear

CfgInt cfg_rodenticide_dumppolyendyear("RODENTICIDE_DUMPPOLYENDYEAR", CFG_CUSTOM,-1) ( "RODENTICIDE_DUMPPOLYENDYEAR"  ,
CFG_CUSTOM  ,
1 
)

The last year to dump the rodenticide polygon information. Note that defaults are set so as not to dump this information.

Referenced by RodenticideManager::Tick().

◆ cfg_rodenticide_dumppolyinterval

CfgInt cfg_rodenticide_dumppolyinterval("RODENTICIDE_DUMPPOLYINTERVAL", CFG_CUSTOM, 180) ( "RODENTICIDE_DUMPPOLYINTERVAL"  ,
CFG_CUSTOM  ,
180   
)

The interval of days during the year after which to dump the polygon information. 180 will result in 3 dumps, day 0 day 180 and day 360.

Referenced by RodenticideManager::Tick().

◆ cfg_rodenticide_dumppolystartyear

CfgInt cfg_rodenticide_dumppolystartyear("RODENTICIDE_DUMPPOLYSTARTYEAR", CFG_CUSTOM, 99999) ( "RODENTICIDE_DUMPPOLYSTARTYEAR"  ,
CFG_CUSTOM  ,
99999   
)

The first year to dump the rodenticide polygon information. Note that defaults are set so as not to dump this information.

Referenced by RodenticideManager::Tick().

◆ cfg_rodenticide_gridsize

CfgInt cfg_rodenticide_gridsize("RODENTICIDE_GRIDSIZE", CFG_CUSTOM, 5) ( "RODENTICIDE_GRIDSIZE"  ,
CFG_CUSTOM  ,
 
)

This is the power of 2 to raise the grid size to, so 0 = 1x1m, 1 = 2x2m 2 = 4x4m etc..

Referenced by RodenticideManager::RodenticideManager().

◆ cfg_rodenticide_immigrationRate

CfgFloat cfg_rodenticide_immigrationRate("RODENTICIDE_IMMIGRATIONRATE", CFG_CUSTOM, 1.0) ( "RODENTICIDE_IMMIGRATIONRATE"  ,
CFG_CUSTOM  ,
1.  0 
)

The rate of immigration to the baitl area assumed. This parameter is used to ensure that the population of mice does not simply die out after a few days as if forms a travelling wave from the bait. If this is set to non-zero then the immigration rate will determine the extent to which the mice will reach (distance from bait) under stable bait replacement conditions.

Referenced by RodenticideManager::RodenticideManager().

◆ g_rand_uni

boost::variate_generator<base_generator_type&, boost::uniform_real<> > g_rand_uni
extern